/*    */ package com.jcrj.util;
/*    */ 
/*    */ public class CreateForm
/*    */ {
/*  6 */   private static String bzsr = "input";
/*  7 */   private static String dateTime = "date";
/*  8 */   private static String wordEditor = "word";
/*  9 */   private static String upload = "upload";
/* 10 */   private static String moreText = "textarea";
/* 11 */   private static String opinion = "opinion";
/* 12 */   private static String loginOrg = "org";
/* 13 */   private static String loginUser = "user";
/*    */ 
/*    */   public static String getProportyToHtml(String proporty, int len, String type, String value)
/*    */   {
/* 17 */     String html = "";
/* 18 */     if (bzsr.equals(type))
/* 19 */       html = "<input id=\"" + proporty + "\" disabled=\"disabled\"  maxlength=\"" + len / 2 + "\"  size=\"20\"   type=\"text\" value=\"" + isEmpty(value) + "\"/>";
/* 20 */     else if (dateTime.equals(type))
/* 21 */       html = "<input id=\"" + proporty + "\" disabled=\"disabled\"   maxlength=\"" + len / 2 + "\"   size=\"20\"  onclick=\"WdatePicker()\"  class=\"Wdate\" type=\"text\" />";
/* 22 */     else if (wordEditor.equals(type))
/* 23 */       html = "<input class=\"button_04\" disabled=\"disabled\" id=\"word\" type=\"button\"  value=\"正文编辑\" onclick=\"draftWord('" + proporty + "');\" /><input name=\"word\" type=\"hidden\" id=\"" + proporty + "\" >";
/* 24 */     else if (upload.equals(type))
/* 25 */       html = "<input type=\"hidden\"   id=\"" + proporty + "\"><input disabled=\"disabled\" id=\"upload\" class=\"button_04\" type=\"button\"  value=\"上传附件\" onclick=\"file_upload('filetable')\"/> <input type=\"button\" class=\"button_02\"  onclick=\"fileDel('filetable')\"  value=\"删除\"/><br/><table id=\"filetable\" align=\"left\"></table>";
/* 26 */     else if (moreText.equals(type))
/* 27 */       html = "<textarea style='width:99%; height:100px; border:0; overflow:hidden' cols=\"30\" disabled=\"disabled\"  rows=\"4\" id=\"" + proporty + "\"></textarea>";
/* 28 */     else if (opinion.equals(type))
/* 29 */       html = "<textarea style='width:99%; height:100px; border:0; overflow:hidden' type='text' cols=\"30\"  rows=\"4\"   id=\"" + proporty + "\" disabled=\"disabled\"  check=\"sign\"></textarea>";
/* 30 */     else if (loginOrg.equals(type))
/* 31 */       html = "<input id=\"" + proporty + "\" disabled=\"disabled\"   maxlength=\"" + len / 2 + "\"  size=\"20\"   type=\"text\" />";
/* 32 */     else if (loginUser.equals(type)) {
/* 33 */       html = "<input id=\"" + proporty + "\"  disabled=\"disabled\" maxlength=\"" + len / 2 + "\"  size=\"20\"   type=\"text\" />";
/*    */     }
/* 35 */     return html;
/*    */   }
/*    */ 
/*    */   private static String isEmpty(Object obj)
/*    */   {
/* 40 */     if (obj == null) {
/* 41 */       return "";
/*    */     }
/* 43 */     return obj.toString();
/*    */   }
/*    */ }

/* Location:           /Volumes/work/oa/WEB-INF/classes/
 * Qualified Name:     com.jcrj.util.CreateForm
 * JD-Core Version:    0.6.0
 */